package com.zmzncs.shop.module.shop.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zmzncs.shop.module.shop.pojo.shoporder.*;
import org.springframework.web.bind.annotation.RequestParam;
import sun.rmi.runtime.Log;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 商户-订单 服务类
 * </p>
 *
 * @author 高博文
 * @since 2021-05-25
 */
public interface ShopOrderService extends IService<ShopOrder> {

    /** 分页 */
    IPage<ShopOrderDTO> page(ShopOrderSearchForm form);

    /** 添加 */
    void add(ShopOrderAddForm form);

    /** 删除 */
    void delete(Long id);

    /** 修改 */
    void update(ShopOrderUpdateForm form);

    /** 详情 */
    ShopOrderDTO getById(Long id);

    /**根据核销码查询商户订单详情*/
    ShopOrderDTO getByWriteOffCode(String writeOffCode,Long shopId);

    /**首页-今日收入*/
    String todayRevenue(Long shopId);

    /**首页-收入详情-商品核销收入*/
    String writeOffRevenue(Long shopId, Integer dateType);

    /**首页-收入详情-引流投入*/
    String invest(Long shopId, Integer dateType);

    /**首页-收入详情-总收益环比*/
    List<Double> getMonthIncome(Long shopId);

    /**首页-核销记录*/
    IPage<ShopOrderDTO> getWriteOffPage(ShopOrderWriteOffForm form);

    /**核销商品订单*/
    void writeOffCode(Long orderId);

}
